﻿using System;

namespace Plugins.Library
{
    public static class PluginEventHelper
    {
        public static bool FindDelegate(Delegate source, Delegate value)
        {
            if (source != null)
            {
                foreach (Delegate eventDelegate in source.GetInvocationList())
                {
                    if (eventDelegate == value)
                    {
                        return true;
                    }
                }
            }
            return false;
        }
    }
}
